<?php echo $this->partial('partials/admin.phtml'); ?>
<?php
$orderline = $this->orderline;
//pre($orderline);
$flage = 1;
?>
<?php for ($i = 0; $i < count($orderline); $i++) : ?>

    <div style="border: solid 2px black;">
    <?php for ($j = $i; $j < count($orderline); $j++) : ?>
    
    <?php if ($orderline[$i]['order_id'] == $orderline[$j]['order_id']): ?>
    <?php echo "Order Number" . $orderline[$j]['order_id']; ?>
    <?php echo "Product Purchased" . $orderline[$j]['product_id']; ?>

    <?php echo " - Price : " . $orderline[$j]['price']; ?>
    <?php echo " - Quantity : " . $orderline[$j]['quantity']; ?>
            <br>
    <?php else: ?>

    <?php $i=$j-1; break; ?>
    <?php endif; ?>
    <?php endfor; ?>
            </div>
            <br>
<?php endfor; ?>

<?php /* if ($orderId1 != $orderId2): ?>

                  <div style="border: solid 2px black;">
                  <?php echo "Order Number" . $orderline[$i - 1]['order_id']; ?>
                  <br>
                  <?php endif; ?>


                  <?php echo "Product Purchased" . $orderline[$i - 1]['product_id']; ?>

                  <?php echo " - Price : " . $orderline[$i - 1]['price']; ?>
                  <?php echo " - Quantity : " . $orderline[$i - 1]['quantity']; ?>
                  <br>

                  <?php if ($orderId1 != $orderId2): ?>
                  </div>
                  <br>
                  <?php endif; ?>
                 */
?>
<?php /*
                  $orderId1 = $orderline[count($orderline) - 1]['order_id'];
                  $orderId2 = $orderline[count($orderline) - 2]['order_id'];
                  ?>
                  <?php if ($orderId1 != $orderId2): ?>
                  <div style="border: solid 2px black;">
                  <?php echo "Order Number" . $orderline[count($orderline) - 1]['order_id']; ?>
                  <br>
                  <?php endif; ?>
                  <?php echo "Product Purchased" . $orderline[count($orderline) - 1]['product_id']; ?>

                  <?php echo " - Price : " . $orderline[count($orderline) - 1]['price']; ?>
                  <?php echo " - Quantity : " . $orderline[count($orderline) - 1]['quantity']; ?>
                  <br>

                  <?php if ($orderId1 != $orderId2): ?>
                  </div>
                  <br>
                  <?php endif; ?>
                 */ ?>